<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>绿地安全卫士</title>
    <link rel="stylesheet" href="/static/assets/css/login.css">
    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
<!--    <script src="/static/index/index.js"></script>-->
    <script src="/static/index/login/index.js"></script>
    <script src="/static/assets/js/vue.min.js"></script>
    <script src="/static/assets/js/jquery.min.js"></script>
    <script src="https://unpkg.com/element-ui/lib/index.js"></script>
    <script src="https://unpkg.com/http-vue-loader"></script>
    <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
</head>
<body>
<div id="app">
    <section>
        <div class="box">
            <div class="form">
                <h2>绿地安全卫士</h2>

                    <div class="inputBx">
                        <input type="text" placeholder="Phone" v-model="phone" @keyup.enter="login()">
                    </div>

                    <div class="inputBx">
                        <input type="password" placeholder="Password" v-model="password" @keyup.enter="login()">
                    </div>
                    <label class="remeber">
                        <el-radio  label="1">Remeber Me</el-radio>
                    </label>
                <el-button round @click="login()">Login</el-button>
                <p>Forget <a href="#">Password</a></p>
                <p>Need an <a href="#">Account</a></p>
            </div>
        </div>
    </section>

</div>
</body>
<script  type="module">
    import axios from "/static/index/login/index.js";

    new Vue({
        el: "#app",
        data: {
            userOne: [],
            phone:'',
            password:'',
        },
        mounted() {
        },
        components: {},
        methods: {
            login(){
                let user = {"phone":this.phone,"password":this.password}
                if (user.password=="" || user.phone==""){
                    alert("账号密码不为空")
                    return
                }
                axios.axiosPost('/login/webLogin', user).then(response=>{
                    // window.location.href="http://1.117.171.162:9090"
                    console.log(response)
                }).catch(reason => {
                    console.log(reason)
                })
            },
        }

    })
</script>
<style>

</style>
</html>